Repository navigation
Conversation
…m tool-call spans
… layers Draw the directly-follows graph of the Call graph tab with Roassal
… shared with the tables Keep the local-spans setting out of the way of the OpenTelemetry backend tests
Open the OCEL tab on the session object type
Gabriel-Darbord
left a comment
Member
There was a problem hiding this comment.
Reviewed with both branches loaded in a fresh Pharo 14 image, driving the real server; MCP-OpenTelemetry-Tests and MCP-UI-Tests pass. The OCEL tab works in the inspector.
Where it belongs
We don't think this should be merged into MCP as it is. Whatever we merge, we maintain, and most of this PR is an analysis of MCP's spans, not something MCP needs to do its job:
- an in-memory span store wired into the OpenTelemetry backend;
- an object-centric event log and directly-follows graphs (process mining);
- a span JSON format plus OCEL 2.0 import and export;
- a Roassal UI.
The tab is already added by an extension method in its own package, so moving it out costs little. Proposed split:
- In MCP, as its own small PR with tests: a generic hook, spans handed to extra span processors that survive MCP's provider rebuilds, and spans made even when nothing is exported. It must not name what uses it.
- In its own repository: the OCEL model, the file formats and the Roassal UI, depending on MCP's
Telemetrygroup. Its baseline declares Roassal and the Pharo versions it supports.
The hook is the part that needs the most care today. Ticking "Keep spans":
- switches the server to the OpenTelemetry backend;
- when nothing is exported, replaces the image's global tracer, meter and logger providers, which the comment of
reconfigure:with:says may be the user's; - does so for every server in the image, and stays on in a saved image.
Screen checks (head 15e2418)
- The window is still "Unnamed Window" when the presenter is opened on its own: it has no
title, whileMCPObservabilityPresenterhas 'MCP Observability'. In the inspector the tab reads "OCEL". - The toolbar overflows: at 700 px wide (the size of the screenshots above), Refresh, Clear, Export and Import are off-screen. In the inspector each table shows about two rows.
- "Object: tool" draws almost no arrows by construction: a tool's calls only follow each other, so the graph is boxes labelled "again xN" plus one arrow per dispatched call. "Object: session" is the useful view.
- Export and Import are broken on Pharo 10 and 11: CI warns that
StSaveFilePresenter,StOpenFilePresenterandStCustomExtensionsFilterare undeclared there. CI is green only because no test opens the presenter. - "Keep spans (no export)" misleads in an image that exports spans: they are still exported, as the settings say.
- "OCEL" is jargon for a tab name, and the code calls the view a call graph (
MCPCallGraphPresenter,inspectionCallGraph:). - The description no longer matches the branch: it doesn't mention Export/Import, OCEL 2.0 or the layout menu.
Gabriel-Darbord
requested changes
Nov 24, 2026
Gabriel-Darbord
left a comment
Member
There was a problem hiding this comment.
Either:
- Argue how this belongs to the MCP project
- Update this PR to implement the hook
- Close and open a new PR with the hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an "OCEL" inspector tab: call graph of tool calls from OpenTelemetry spans
An object-centric process-mining view of the MCP server, built from the OpenTelemetry spans of tool calls. Events are tool calls; the objects are the tool, the session and the client.
What it adds
MCPOcelLog,MCPOcelFlowGraph,MCPOcelEdge): event log and a directly-follows graph per object type.MCP-OpenTelemetry-UI(groupTelemetry UI, loaded only with OpenTelemetry): tables plus a Roassal graph.Visuals
Notes
MCP-OpenTelemetry-Testsare unrelated: the client-name test and the one depending onMCPEvaluateTestProbe(MCP-Tests not loaded).